<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script src="../dev/vendors/vue.js"></script>
    <div id="app">
        Message: <span v-html="msg" v-if="id"></span>
        <a v-bind:href="url">{{url | a(1,2) | b }}</a>
    </div>
    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                id: !1,
                url:'http://www.baidu.com',
                msg: 'hello Vue.js'
            },
            filters: {
                a: function (value,x,y) {
                    console.log('x==='+x)
                    console.log('y==='+y)
                    return value.toUpperCase()
                },
                b: function (value) {
                    return value.replace('WWW.','')
                }
            }
        })
    </script>
</body>
</html>